package com.fys.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author: fys
 * @description:
 * @create: 2020-07-23 18:08
 **/
//@SpringBootApplication
//@EnableDiscoveryClient
//@EnableHystrix  //启动熔断器Hystrix
//@EnableCircuitBreaker //启动熔断器的另外一种方式

//使用@SpringCloudApplication注解替代上面三个注解
@SpringCloudApplication
//启动Hystrix可视化窗口
@EnableHystrixDashboard
@EnableFeignClients(basePackages = "com.fys.product.client")
public class OrderApplication {


    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

}
